package org.dromara.system.domain.bo;

import org.dromara.system.domain.TQuestion;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 问题项业务对象 t_question
 *
 * @author Lion Li
 * @date 2024-10-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = TQuestion.class, reverseConvertGenerate = false)
public class TQuestionBo extends BaseEntity {

    /**
     * 问题ID
     */
    @NotNull(message = "问题ID不能为空", groups = { EditGroup.class })
    private Integer questionId;

    /**
     * 表单ID
     */
    @NotNull(message = "表单ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer surveyId;

    /**
     * 问题描述
     */
    @NotBlank(message = "问题描述不能为空", groups = { AddGroup.class, EditGroup.class })
    private String questionText;

    /**
     * 问题类型
     */
    @NotBlank(message = "问题类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String questionType;

    /**
     * 是否必填
     */
    @NotNull(message = "是否必填不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer required;

    /**
     * 排序值(越小越靠前)
     */
    @NotNull(message = "排序值(越小越靠前)不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer orderIndex;


}
